package com.zhentao.redission;

import lombok.extern.slf4j.Slf4j;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: RedissionConfig
 * @Author: 振涛教育_Q
 * @Date: 2024/11/19 11:20
 */
@Configuration
@Slf4j
public class RedissionConfig {

    @Bean
    public RedissonClient redissonClient(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://182.92.219.86:6379")
                .setPassword("charge");
        return Redisson.create(config);
    }
}
